<template>
	<view>
		<u-tabbar v-model="current"  :list="list" :mid-button="true" @change="tabChange" />
	</view>
</template>

<script>
	export default {
		name:"MyTabbar",
		data() {
			return {
				list: [],
				current: 0
			}
		},
		created() {
			uni.hideTabBar();
			this.current = this.$store.getters.tabCurrent;
			this.list = this.$store.getters.tabList;
		},
		methods:{
			tabChange(index){
				console.log(index);
				this.$store.commit("changeTab",index);
			}
		}
	}
</script>

<style>
</style>
